﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="RateList.aspx.cs" Inherits="RateList" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Header" runat="server">
    <script type="text/javascript">
        $(function () {
            $(".tip").tipsy({ fade: true, title: function () { return $(this).siblings("div.rDetail").html(); }, html: true });

            var page = parseInt('<% =hidPage.Value %>'.toString());
            var totalPage = parseInt('<% =hidTotalPage.Value %>'.toString());
            var totalResults = parseInt('<% =hidTotalResults.Value %>'.toString());
            var p1 = parseInt(totalResults / 4);
            var p2 = parseInt(totalResults % 4);

            for (var i = 0; i < p2; i++) {
                if (i == 0) {
                    $(".page").html("<a class='number' style='cursor:pointer'>1</a>");
                }
                else {
                    $(".page").append("<a class='number'>" + i + 1 + (totalPage - 1) * 4 + "</a>");
                }
            }
            $(".page a").eq(p2 - 1).addClass("current");

            $(".page a.number").click(function () {
                $("#hidPage").val($(this).text());
                $("#aspnetForm").submit();
            });
        });
    </script>
    <link rel="Stylesheet" type="text/css" href="tipsy-0.1.7/docs/stylesheets/tipsy.css" />
    <link rel="Stylesheet" type="text/css" href="tipsy-0.1.7/docs/tipsy-docs.css" />
    <script type="text/javascript" src="tipsy-0.1.7/docs/javascripts/jquery.tipsy.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    
    <div class="content-box"><!-- Start Content Box -->
				
				<div class="content-box-header">
					
					<h3>评价盒子</h3>
					
					<ul class="content-box-tabs">
						<li><a href="#tab1" class="default-tab">Table</a></li> <!-- href must be unique and match the id of target div -->
						<li><a href="#tab2">Forms</a></li>
					</ul>
					
					<div class="clear"></div>
					
				</div> <!-- End .content-box-header -->
				
				<div class="content-box-content">
					
					<div class="tab-content default-tab" id="tab1"> <!-- This is the target div. id must match the href of this div's tab -->
						
						<!--<div class="notification attention png_bg">
							<a href="#" class="close"><img src="Images/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a>
							<div>
								This is a Content Box. You can put whatever you want in it. By the way, you can close this notification with the top-right cross.
							</div>
						</div>-->
						
						<table>
							
							<thead>
								<tr>
                                   <th class="center" style="width:100px">订单ID</th>
								   <th class="center" style="width:300px">商品标题</th>
								   <th class="center" style="width:100px">评价类型</th>
								   <th class="center" style="width:300px">评价内容</th>
								   <th class="center" style="width:100px">买家姓名</th>
								   <th class="center" style="width:100px">买家电话</th>
								</tr>
								
							</thead>
						 
							<tfoot>
								<tr>
									<td colspan="6">
										<div class="bulk-actions align-left">
                                            <asp:DropDownList ID="ddlRType" runat="server">
                                                <asp:ListItem Value="2" Text="好评"></asp:ListItem>
                                                <asp:ListItem Value="1" Text="中评"></asp:ListItem>
                                                <asp:ListItem Value="0" Text="差评" Selected="True"></asp:ListItem>
                                            </asp:DropDownList>
                                            <asp:Button ID="btnSelect" runat="server" CssClass="button" Text="选择评价类型" onclick="btnSelect_Click" />
										</div>
										<div class="pagination">
                                            <asp:HiddenField ID="hidPage" runat="server" />
                                            <asp:HiddenField ID="hidPageCount" runat="server" />
                                            <asp:HiddenField ID="hidTotalPage" runat="server" />
                                            <asp:HiddenField ID="hidTotalResults" runat="server" />
                                            <asp:LinkButton ID="lbtnFirst" runat="server" Text="&laquo; First" onclick="lbtnFirst_Click"></asp:LinkButton>
                                            <asp:LinkButton ID="lbtnPrevious" runat="server" Text="&laquo; Previous" onclick="lbtnPrevious_Click"></asp:LinkButton>
                                             <span class="page">
                                                <a href="#" class="number current" title="1">1</a>
											    <a href="#" class="number" title="2">2</a>
											    <a href="#" class="number" title="3">3</a>
											    <a href="#" class="number" title="4">4</a>
                                            </span>
											<asp:LinkButton ID="lbtnNext" runat="server" Text="Next &raquo;" onclick="lbtnNext_Click"></asp:LinkButton>
                                            <asp:LinkButton ID="lbtnLast" runat="server" Text="Last &raquo;" onclick="lbtnLast_Click"></asp:LinkButton>
										</div> <!-- End .pagination -->
										<div class="clear"></div>
									</td>
								</tr>
							</tfoot>
						 
							<tbody>
                                <asp:Repeater ID="reqRates" runat="server">
                                    <ItemTemplate>
                                        <tr>
                                            <td><%# Eval("TID") %></td>
                                            <td><%# Eval("Title") %></td>
                                            <td class="center"><%# Eval("RateType") %></td>
                                            <td><%# Eval("Content") %></td>
                                            <td class="center"><a class="tip" href="#"><%# Eval("Nick") %></a><div class="rDetail" style="display:none;">买家姓名：<%# Eval("ReceiverName") %><br />买家地址：<%# Eval("ReceiverState").ToString() + Eval("ReceiverCity").ToString() + Eval("ReceiverDistrict").ToString() + Eval("ReceiverAddress").ToString() %></div></td>
                                            <td class="center"><%# Eval("ReceiverMobile")+"<br/>"+Eval("ReceiverPhone") %></td>
                                        </tr>
                                    </ItemTemplate>
                                </asp:Repeater>
							</tbody>
							
						</table>

					</div> <!-- End #tab1 -->
					
					<div class="tab-content" id="tab2">
					
						<form action="#" method="post">
							
							<fieldset> <!-- Set class to "column-left" or "column-right" on fieldsets to divide the form into columns -->
								
								<p>
									<label>Small form input</label>
										<input class="text-input small-input" type="text" id="small-input" name="small-input" /> <span class="input-notification success png_bg">Successful message</span> <!-- Classes for input-notification: success, error, information, attention -->
										<br /><small>A small description of the field</small>
								</p>
								<p>
									<label>Medium form input</label>
									<input class="text-input medium-input datepicker" type="text" id="medium-input" name="medium-input" /> <span class="input-notification error png_bg">Error message</span>
								</p>
								
								<p>
									<label>Large form input</label>
									<input class="text-input large-input" type="text" id="large-input" name="large-input" />
								</p>
								
								<p>
									<label>Checkboxes</label>
									<input type="checkbox" name="checkbox1" /> This is a checkbox <input type="checkbox" name="checkbox2" /> And this is another checkbox
								</p>
								
								<p>
									<label>Radio buttons</label>
									<input type="radio" name="radio1" /> This is a radio button<br />
									<input type="radio" name="radio2" /> This is another radio button
								</p>
								
								<p>
									<label>This is a drop down list</label>              
									<select name="dropdown" class="small-input">
										<option value="option1">Option 1</option>
										<option value="option2">Option 2</option>
										<option value="option3">Option 3</option>
										<option value="option4">Option 4</option>
									</select> 
								</p>
								
								<p>
									<label>Textarea with WYSIWYG</label>
									<textarea class="text-input textarea wysiwyg" id="textarea" name="textfield" cols="79" rows="15"></textarea>
								</p>
								
								<p>
									<input class="button" type="submit" value="Submit" />
								</p>
								
							</fieldset>
							
							<div class="clear"></div><!-- End .clear -->
							
						</form>
						
					</div> <!-- End #tab2 -->        
					
				</div> <!-- End .content-box-content -->
				
			</div> <!-- End .content-box -->

</asp:Content>

